<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="../../css/plupload.queue.css" type="text/css" media="screen" />
<title>파일 첨부</title>
<style type="text/css">
body {background: #45494d;}
</style>
<script src="/seah.admin/static/js/jquery.1.5.2.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="../../js/plupload/gears_init.js"></script>
<script type="text/javascript" src="../../js/plupload/browserplus-min.js"></script>
<script type="text/javascript" src="../../js/plupload/plupload.full.min.js"></script>
<script type="text/javascript" src="../../js/plupload/jquery.plupload.queue.min.js"></script>
<script type="text/javascript">
$(function() {


	$("#uploader").pluploadQueue({
		// General settings
		runtimes: 'flash,gears,browserplus,silverlight,html5,html4',
		url: 'file_upload.asp',
		//max_file_size: '5mb',
		//chunk_size: '1mb',
		unique_names: true,

		// Resize images on clientside if we can
		//resize: {width: 400, height: 400, quality: 90},

		// Specify what files to browse for
		filters: [
			{title: "All files", extensions: "*"},
			{title: "Image files", extensions: "jpg,gif,png,jpeg,bmp,tif"},
			{title: "adobe files", extensions: "pds,ai"},
			{title: "Documents", extensions: "doc,pdf,xls,xlsx,docx,ppt,pptx,eml,mdb,rtf,txt,dwg,dxf,max,3dm,zip,7z,gz,tag.gz,iso,hwp"},
			{title : "Video files", extensions : "avi,mpg,mov,wmv,avchd,3gp,asf,m4v,mpeg,mpeg4,mpg4,mp4,qt,flv"},
            {title : "Audio files", extensions : "mp3,flac,wma"},
            {title : "exe files", extensions : "exe"},
			{title: "Zip files", extensions: "zip,alz,rar,tar,egg,jar"}
		],

		// Flash/Silverlight paths
		flash_swf_url: '../../js/plupload/plupload.flash.swf',
		silverlight_xap_url: '../../js/plupload/plupload.silverlight.xap',

		// Post init events, bound after the internal events
		init: {

			FileUploaded: function(up, file, info) {
				// Called when a file has finished uploading

				if($('input[name=ffname]').val() == ''){
					fname = file.name;
					$('input[name=ffname]').val(fname);
				}else {
					fname = $('input[name=ffname]').val() + "," +file.name;
					$('input[name=ffname]').val(fname);
				}
				if (up.total.uploaded == up.files.length){
					$('form').submit();
				}
			}
		}
	});

});
</script>
</head>
<body>

<form  method="post" action="file_process.asp">
	<input type="hidden" name="ffname" value="" />
	<div id="uploader">&nbsp;</div>
</form>

</body>
</html>